﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace Jc.MicroDesigner
{
    /// <summary>
    /// Просмотрщик справочных материвалов
    /// </summary>
    public partial class HelpViewer : Form
    {
        public HelpViewer()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Показать справку
        /// </summary>
        public void ShowHelp()
        {
            string path = Application.StartupPath + Path.DirectorySeparatorChar + "Help" + Path.DirectorySeparatorChar + "index.htm";
            help_browser.Url = new Uri(path);
            ShowDialog();
        }

        void help_browser_Navigated(object sender, WebBrowserNavigatedEventArgs e)
        {
            this.Text = "Справочное руководство: " + help_browser.DocumentTitle;           
        }
    }
}